Skip to content

Conversation

@kdinev
Copy link
Member

@kdinev kdinev commented Nov 19, 2025

Closes #

Additional information (check all that apply):

  • Bug fix
  • New functionality
  • Documentation
  • Demos
  • CI/CD

Checklist:

  • All relevant tags have been applied to this PR
  • This PR includes unit tests covering all the new code (test guidelines)
  • This PR includes API docs for newly added methods/properties (api docs guidelines)
  • This PR includes feature/README.MD updates for the feature docs
  • This PR includes general feature table updates in the root README.MD
  • This PR includes CHANGELOG.MD updates for newly added functionality
  • This PR contains breaking changes
  • This PR includes ng update migrations for the breaking changes (migrations guidelines)
  • This PR includes behavioral changes and the feature specification has been updated with them

@kdinev kdinev added dependencies Pull requests that update a dependency file version: 21.0.x labels Nov 19, 2025
@kdinev kdinev requested a review from Copilot November 19, 2025 20:58
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR upgrades the project from Angular 20 to Angular 21, updating all related dependencies and making necessary code adjustments for compatibility.

Key changes include:

  • Angular framework updated from version 20.x to 21.0.0 across all packages
  • Migration to Angular 21's control flow syntax (replacing *ngIf with @if/@else)
  • Addition of provideZoneChangeDetection() to bootstrap configurations

Reviewed Changes

Copilot reviewed 8 out of 10 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
package.json Updated Angular core packages from ^20.3.6 to ^21.0.0, updated supporting packages (zone.js, typescript, igniteui-theming, etc.)
projects/igniteui-angular/package.json Updated Angular peer dependencies from version 20 to 21, bumped igniteui-theming to ^23.1.1
src/main.ts Added provideZoneChangeDetection() to bootstrap configuration
src/main.server.ts Added provideZoneChangeDetection() to server-side bootstrap configuration
projects/bundle-test/src/main.ts Added provideZoneChangeDetection() to bootstrap configuration for bundle test
projects/bundle-test/src/main.server.ts Added provideZoneChangeDetection() to server-side bootstrap configuration for bundle test
projects/igniteui-angular/directives/src/directives/tooltip/tooltip-close-button.component.ts Migrated from *ngIf/ng-template to Angular 21's @if/@else control flow syntax
projects/igniteui-angular/date-picker/src/date-range-picker/predefined-ranges/predefined-ranges-area.component.ts Removed unused CommonModule import
Comments suppressed due to low confidence (1)

projects/bundle-test/src/main.server.ts:1

  • The bootstrap configuration is duplicating providers by spreading config.providers. If config already includes provideZoneChangeDetection(), this will result in duplicate providers. Consider checking if zone change detection is already configured in config before adding it, or modify config directly instead of spreading and overriding.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

registerLocaleData(localeZh);

bootstrapApplication(AppComponent, appConfig).catch(err => console.log(err));
bootstrapApplication(AppComponent, {...appConfig, providers: [provideZoneChangeDetection(), ...appConfig.providers]}).catch(err => console.log(err));
Copy link

Copilot AI Nov 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The bootstrap configuration is duplicating providers by spreading appConfig.providers. If appConfig already includes provideZoneChangeDetection(), this will result in duplicate providers. Consider checking if zone change detection is already configured in appConfig before adding it, or modify appConfig directly instead of spreading and overriding.

Suggested change
bootstrapApplication(AppComponent, {...appConfig, providers: [provideZoneChangeDetection(), ...appConfig.providers]}).catch(err => console.log(err));
// Ensure provideZoneChangeDetection is only added once
const zoneProvider = provideZoneChangeDetection();
const hasZoneProvider = appConfig.providers?.some(
p => p && p.provide === zoneProvider.provide
);
if (!hasZoneProvider) {
appConfig.providers = [zoneProvider, ...(appConfig.providers || [])];
}
bootstrapApplication(AppComponent, { ...appConfig }).catch(err => console.log(err));

Copilot uses AI. Check for mistakes.
import { config } from './app/app.config.server';

const bootstrap = (context: BootstrapContext) => bootstrapApplication(AppComponent, config, context);
const bootstrap = (context: BootstrapContext) => bootstrapApplication(AppComponent, {...config, providers: [provideZoneChangeDetection(), ...config.providers]}, context);
Copy link

Copilot AI Nov 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The bootstrap configuration is duplicating providers by spreading config.providers. If config already includes provideZoneChangeDetection(), this will result in duplicate providers. Consider checking if zone change detection is already configured in config before adding it, or modify config directly instead of spreading and overriding.

Suggested change
const bootstrap = (context: BootstrapContext) => bootstrapApplication(AppComponent, {...config, providers: [provideZoneChangeDetection(), ...config.providers]}, context);
const zoneProvider = provideZoneChangeDetection();
const hasZoneProvider = config.providers?.some(
(provider) => provider && provider.provide === zoneProvider.provide
);
const providers = hasZoneProvider
? [...config.providers]
: [zoneProvider, ...config.providers];
const bootstrap = (context: BootstrapContext) =>
bootstrapApplication(AppComponent, { ...config, providers }, context);

Copilot uses AI. Check for mistakes.


bootstrapApplication(AppComponent, appConfig).catch(err => console.error(err));
bootstrapApplication(AppComponent, {...appConfig, providers: [provideZoneChangeDetection(), ...appConfig.providers]}).catch(err => console.error(err));
Copy link

Copilot AI Nov 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The bootstrap configuration is duplicating providers by spreading appConfig.providers. If appConfig already includes provideZoneChangeDetection(), this will result in duplicate providers. Consider checking if zone change detection is already configured in appConfig before adding it, or modify appConfig directly instead of spreading and overriding.

Suggested change
bootstrapApplication(AppComponent, {...appConfig, providers: [provideZoneChangeDetection(), ...appConfig.providers]}).catch(err => console.error(err));
// Ensure provideZoneChangeDetection is only added once
const zoneProvider = provideZoneChangeDetection();
if (!appConfig.providers.some(p => p.provide === zoneProvider.provide)) {
appConfig.providers.unshift(zoneProvider);
}
bootstrapApplication(AppComponent, appConfig).catch(err => console.error(err));

Copilot uses AI. Check for mistakes.
@rkaraivanov rkaraivanov deleted the angular-21 branch November 20, 2025 09:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file version: 21.0.x

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants